﻿@using eLoan.Models;
@model List<PaymentType>

@{
    ViewBag.Title = "Payment Types";
}

<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-lg-10">
        <h2>Payment Types</h2>
        <ol class="breadcrumb">
            <li>
                Administration
            </li>
            <li class="active">
                <strong>Payment Types</strong>
            </li>
        </ol>
    </div>
    <div class="col-lg-2"></div>
</div>
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-lg-6">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <div class="">
                        <a href="@Url.Action("AddEdit", "PaymentType")" class="btn btn-primary">Add a new payment type</a>
                    </div>
                </div>
                <div class="ibox-content">
                    <div class="scrollable">
                        <table class="table table-bordered">
                            <thead>
                                <tr>
                                    <th>Payment Type</th>
                                    <th>Description</th>
                                    <th>Is Active</th>
                                    <th></th>
                                </tr>
                            </thead>
                            <tbody>
                                @for (var i = 0; i < Model.Count(); i++)
                                {
                                    <tr>
                                        <td>@Html.DisplayFor(m => Model[i].PaymentTypeName)</td>
                                        <td>@Html.DisplayFor(m => Model[i].Description)</td>
                                        <td style="text-align:center">@Html.DisplayFor(m => Model[i].IsActive)</td>
                                        <td>@Html.ActionLink("Edit", "AddEdit", "PaymentType", null, null, null, new { id = Model[i].ID }, null)</td>
                                    </tr>
                                }
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>

        </div>
    </div>
</div>
@section Styles {
    @Styles.Render("~/Content/plugins/dataTables/dataTablesStyles")
<style>
    .scrollable {
        height: 400px;
        overflow-y: scroll;
        border: solid 1px #EBEBEB;
    }
</style>
}